Forms, Element - Text Box

 

Use

A text box allows a visitor to enter a single line of text into a form and then submit it to you. (See discussion and background for more details.)

Properties

ATTRIBUTE

REQUIRED?

DESCRIPTION

NAME=" "

Required

The name of the text box.

SIZE=" "

Optional

Specifies the size of form element in characters.

MAXLENGTH=" "

Optional

Specifies the maximum amount of characters a visitor can enter into the text box.

VALUE=" "

Optional

Specifies default text to appear in the text box.

Example

<INPUT TYPE="text" NAME="namebox" VALUE="Enter your name here..." SIZE="40" MAXLENGTH="25">

 

NOTE

For this example to work it must be inside form tags (<FORM .. ..> .. .. </FORM>). The entire form code, including all the examples, is ready for you to use.